package com.chenyijie.slice;

import com.chenyijie.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Text;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class MainAbilitySlice extends AbilitySlice {
    //定义一个标签名（建议是本类类名（全路径/简称
    private static final String TAG = MainAbilitySlice.class.getName();
    //定义日志对象
    //类型（暂时只有这一个），域名（0-0xFFFFF），标签（↑）
    private static final HiLogLabel HI_LOG_LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00001, TAG);

    private Text text_hellWorld = null;

    @Override
    public void onStart(Intent intent) {
        //%s字符串占位符/%d数据占位符
//        HiLog.warn(HI_LOG_LABEL, "%{public}s%{public}d", "Hello,HarmonyOS", 20221021);
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
